package com.cn;

import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
import com.alibaba.nacos.api.annotation.NacosProperties;
import com.alibaba.nacos.spring.context.annotation.EnableNacos;
import com.cn.lb.NacosInitializer;
import com.cn.lb.config.RuleConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author: chenyuncong
 * @Date: 2019/11/21 18:08
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
//@EnableNacosConfig(globalProperties = @NacosProperties(serverAddr = "${spring.cloud.nacos.config.server-addr}"))
@EnableNacos(globalProperties=@NacosProperties(serverAddr = "${spring.cloud.nacos.config.server-addr}"))
//@EnableNacosDiscovery(globalProperties=@NacosProperties(serverAddr = "${spring.cloud.nacos.config.server-addr}"))
public class ServiceConsumerApplication {

//    @Bean
//    public NacosInitializer nacosInitializer(){
//        return new NacosInitializer();
//    }
//    @Bean
//    public RuleConfig ruleConfig(){
//        return new RuleConfig();
//    }
    public static void main(String[] args) throws Exception {
        SpringApplication.run(ServiceConsumerApplication.class, args);
    }
}
